package com.wyix.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDate;

/**
 * 成绩信息DTO
 *
 * @author wangdx
 * @since 2025/8/28
 */
@Data
@Schema(description = "成绩信息DTO")
public class ScoreDTO {
    private Long id;

    @NotNull(message = "学生ID不能为空")
    @Schema(description = "学生ID", example = "1")
    private Long studentId;

    @NotNull(message = "课程ID不能为空")
    @Schema(description = "课程ID", example = "1")
    private Long courseId;

    @NotNull(message = "分数不能为空")
    @DecimalMin(value = "0.0", message = "分数不能低于0分")
    @DecimalMax(value = "100.0", message = "分数不能高于100分")
    @Schema(description = "分数", example = "85.5")
    private Double score;

    @NotNull(message = "考试日期不能为空")
    @Schema(description = "考试日期", example = "2023-06-20")
    private LocalDate examDate;
}
